import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { viteMockServe } from 'vite-plugin-mock'

// https://vite.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    viteMockServe({
      mockPath: 'src/mock',
      enable: true,
      watchFiles: true,
      logger: true, // 开启日志，方便调试
    })
  ],
  server: {
    // 确保开发服务器配置正确
    port: 5173,
    host: true
  }
})
